---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-26-b5ca82b63586> in <module>
2 import os
3 latest_data = sorted([x for x in os.listdir('TMC') if x.startswith('Total Tests') and x.endswith('xlsx')])[-1]
----> 4 tmc_data = pd.read_excel(f'TMC/{latest_data}')
5 tmc_data = tmc_data.dropna()
6 tmc_data = tmc_data[tmc_data["Collected Date"] != "Grand Total"]
/opt/conda/lib/python3.7/site-packages/pandas/util/_decorators.py in wrapper(*args, **kwargs)
294 )
295 warnings.warn(msg, FutureWarning, stacklevel=stacklevel)
--> 296 return func(*args, **kwargs)
297
298 return wrapper
/opt/conda/lib/python3.7/site-packages/pandas/io/excel/_base.py in read_excel(io, sheet_name, header, names, index_col, usecols, squeeze, dtype, engine, converters, true_values, false_values, skiprows, nrows, na_values, keep_default_na, na_filter, verbose, parse_dates, date_parser, thousands, comment, skipfooter, convert_float, mangle_dupe_cols)
302
303 if not isinstance(io, ExcelFile):
--> 304 io = ExcelFile(io, engine=engine)
305 elif engine and engine != io.engine:
306 raise ValueError(
/opt/conda/lib/python3.7/site-packages/pandas/io/excel/_base.py in __init__(self, path_or_buffer, engine)
865 self._io = stringify_path(path_or_buffer)
866
--> 867 self._reader = self._engines[engine](self._io)
868
869 def __fspath__(self):
/opt/conda/lib/python3.7/site-packages/pandas/io/excel/_xlrd.py in __init__(self, filepath_or_buffer)
19 """
20 err_msg = "Install xlrd >= 1.0.0 for Excel support"
---> 21 import_optional_dependency("xlrd", extra=err_msg)
22 super().__init__(filepath_or_buffer)
23
/opt/conda/lib/python3.7/site-packages/pandas/compat/_optional.py in import_optional_dependency(name, extra, raise_on_missing, on_version)
108 except ImportError:
109 if raise_on_missing:
--> 110 raise ImportError(msg) from None
111 else:
112 return None
ImportError: Missing optional dependency 'xlrd'. Install xlrd >= 1.0.0 for Excel support Use pip or conda to install xlrd.